Optimal. Leaf size=53 \[ \frac {\sqrt {a^2+b^2} \tanh ^{-1}\left (\frac {\sin (x) (b-a \cot (x))}{\sqrt {a^2+b^2}}\right )}{b^2}+\frac {a \tanh ^{-1}(\cos (x))}{b^2}-\frac {\csc (x)}{b} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.08, antiderivative size = 53, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 5, integrand size = 13, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.385, Rules used = {3510, 3486, 3770, 3509, 206} \[ \frac {\sqrt {a^2+b^2} \tanh ^{-1}\left (\frac {\sin (x) (b-a \cot (x))}{\sqrt {a^2+b^2}}\right )}{b^2}+\frac {a \tanh ^{-1}(\cos (x))}{b^2}-\frac {\csc (x)}{b} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 206
Rule 3486
Rule 3509
Rule 3510
Rule 3770
Rubi steps
\begin {align*} \int \frac {\csc ^3(x)}{a+b \cot (x)} \, dx &=-\frac {\int (a-b \cot (x)) \csc (x) \, dx}{b^2}+\frac {\left (a^2+b^2\right ) \int \frac {\csc (x)}{a+b \cot (x)} \, dx}{b^2}\\ &=-\frac {\csc (x)}{b}-\frac {a \int \csc (x) \, dx}{b^2}-\frac {\left (a^2+b^2\right ) \operatorname {Subst}\left (\int \frac {1}{a^2+b^2-x^2} \, dx,x,(-b+a \cot (x)) \sin (x)\right )}{b^2}\\ &=\frac {a \tanh ^{-1}(\cos (x))}{b^2}+\frac {\sqrt {a^2+b^2} \tanh ^{-1}\left (\frac {(b-a \cot (x)) \sin (x)}{\sqrt {a^2+b^2}}\right )}{b^2}-\frac {\csc (x)}{b}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.13, size = 67, normalized size = 1.26 \[ \frac {2 \sqrt {a^2+b^2} \tanh ^{-1}\left (\frac {b \tan \left (\frac {x}{2}\right )-a}{\sqrt {a^2+b^2}}\right )+a \left (\log \left (\cos \left (\frac {x}{2}\right )\right )-\log \left (\sin \left (\frac {x}{2}\right )\right )\right )-b \csc (x)}{b^2} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [B] time = 0.70, size = 135, normalized size = 2.55 \[ \frac {a \log \left (\frac {1}{2} \, \cos \relax (x) + \frac {1}{2}\right ) \sin \relax (x) - a \log \left (-\frac {1}{2} \, \cos \relax (x) + \frac {1}{2}\right ) \sin \relax (x) + \sqrt {a^{2} + b^{2}} \log \left (-\frac {2 \, a b \cos \relax (x) \sin \relax (x) - {\left (a^{2} - b^{2}\right )} \cos \relax (x)^{2} - a^{2} - 2 \, b^{2} + 2 \, \sqrt {a^{2} + b^{2}} {\left (a \cos \relax (x) - b \sin \relax (x)\right )}}{2 \, a b \cos \relax (x) \sin \relax (x) - {\left (a^{2} - b^{2}\right )} \cos \relax (x)^{2} + a^{2}}\right ) \sin \relax (x) - 2 \, b}{2 \, b^{2} \sin \relax (x)} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [B] time = 0.41, size = 108, normalized size = 2.04 \[ -\frac {a \log \left ({\left | \tan \left (\frac {1}{2} \, x\right ) \right |}\right )}{b^{2}} - \frac {\tan \left (\frac {1}{2} \, x\right )}{2 \, b} - \frac {\sqrt {a^{2} + b^{2}} \log \left (\frac {{\left | 2 \, b \tan \left (\frac {1}{2} \, x\right ) - 2 \, a - 2 \, \sqrt {a^{2} + b^{2}} \right |}}{{\left | 2 \, b \tan \left (\frac {1}{2} \, x\right ) - 2 \, a + 2 \, \sqrt {a^{2} + b^{2}} \right |}}\right )}{b^{2}} + \frac {2 \, a \tan \left (\frac {1}{2} \, x\right ) - b}{2 \, b^{2} \tan \left (\frac {1}{2} \, x\right )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [B] time = 0.27, size = 107, normalized size = 2.02 \[ -\frac {\tan \left (\frac {x}{2}\right )}{2 b}+\frac {2 \arctanh \left (\frac {2 \tan \left (\frac {x}{2}\right ) b -2 a}{2 \sqrt {a^{2}+b^{2}}}\right ) a^{2}}{b^{2} \sqrt {a^{2}+b^{2}}}+\frac {2 \arctanh \left (\frac {2 \tan \left (\frac {x}{2}\right ) b -2 a}{2 \sqrt {a^{2}+b^{2}}}\right )}{\sqrt {a^{2}+b^{2}}}-\frac {1}{2 b \tan \left (\frac {x}{2}\right )}-\frac {a \ln \left (\tan \left (\frac {x}{2}\right )\right )}{b^{2}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [B] time = 1.12, size = 107, normalized size = 2.02 \[ -\frac {a \log \left (\frac {\sin \relax (x)}{\cos \relax (x) + 1}\right )}{b^{2}} - \frac {\sqrt {a^{2} + b^{2}} \log \left (\frac {a - \frac {b \sin \relax (x)}{\cos \relax (x) + 1} + \sqrt {a^{2} + b^{2}}}{a - \frac {b \sin \relax (x)}{\cos \relax (x) + 1} - \sqrt {a^{2} + b^{2}}}\right )}{b^{2}} - \frac {\cos \relax (x) + 1}{2 \, b \sin \relax (x)} - \frac {\sin \relax (x)}{2 \, b {\left (\cos \relax (x) + 1\right )}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 0.49, size = 170, normalized size = 3.21 \[ \frac {2\,\mathrm {atanh}\left (\frac {b^3\,\cos \left (\frac {x}{2}\right )\,\sqrt {a^2+b^2}+4\,a^3\,\sin \left (\frac {x}{2}\right )\,\sqrt {a^2+b^2}+3\,a\,b^2\,\sin \left (\frac {x}{2}\right )\,\sqrt {a^2+b^2}+2\,a^2\,b\,\cos \left (\frac {x}{2}\right )\,\sqrt {a^2+b^2}}{4\,\sin \left (\frac {x}{2}\right )\,a^4+2\,\cos \left (\frac {x}{2}\right )\,a^3\,b+5\,\sin \left (\frac {x}{2}\right )\,a^2\,b^2+2\,\cos \left (\frac {x}{2}\right )\,a\,b^3+\sin \left (\frac {x}{2}\right )\,b^4}\right )\,\sqrt {a^2+b^2}}{b^2}-\frac {1}{b\,\sin \relax (x)}-\frac {a\,\ln \left (\frac {\sin \left (\frac {x}{2}\right )}{\cos \left (\frac {x}{2}\right )}\right )}{b^2} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {\csc ^{3}{\relax (x )}}{a + b \cot {\relax (x )}}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________